var t = require;
var e = module;
var o = exports;
Object.defineProperty(o, "__esModule", {
    value: !0
}),
o.HttpUtil = void 0;
var i = function() {
    function t() {}
    return t.GET = function(t, e, o) {
        void 0 === e && (e = {});
        var i = "";
        Object.keys(e).forEach(function(t) {
            i += t + "=" + encodeURIComponent(e[t]) + "&"
        }),
        "" !== i && (t = t + "?" + (i = i.substring(0, i.lastIndexOf("&"))));
        var n = new XMLHttpRequest;
        n.open("GET", t, !0),
        n.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"),
        n.onreadystatechange = function() {
            if (4 === n.readyState) {
                var t = n.responseText;
                n.status >= 200 && n.status < 300 ? (n.statusText, o(!0, t)) : o(!1, t)
            }
        },
        n.timeout = this.TimeOut,
        n.send()
    },
    t.POST = function(t, e, o) {
        void 0 === e && (e = {});
        var i = new XMLHttpRequest,
        n = "";
        Object.keys(e).forEach(function(t) {
            n += t + "=" + encodeURIComponent(e[t]) + "&"
        }),
        "" !== n && (n = n.substring(0, n.lastIndexOf("&"))),
        i.open("POST", t, !0),
        i.setRequestHeader("Content-Type", "application/json"),
        i.onreadystatechange = function() {
            if (4 === i.readyState) {
                var t = i.responseText;
                i.status >= 200 && i.status < 300 ? (i.statusText, o(!0, t)) : o(!1, t)
            }
        },
        i.send(JSON.stringify(e))
    },
    t.TimeOut = 200,
    t
} ();
o.HttpUtil = i